<script lang="ts" setup>
import CustomMindMap from './customMindMap.vue';
import { ref, computed } from 'vue';
interface Props {
  ruleForm: any
  isEdit?: boolean
}
const props = defineProps<Props>()
const mindMapRef = ref(null)
const emit = defineEmits(['update:ruleForm'])

const ruleFormUpdate = (newVal: any) => {
  emit('update:ruleForm', newVal)
}
</script>

<template>
  <div class="mind-map-page">
    <div class="mind-map-container">
      <custom-mind-map :isEdit="isEdit" :ruleForm="ruleForm.inference_config.end_condition_config" ref="mindMapRef"
        @update:ruleForm="ruleFormUpdate" />
    </div>
  </div>
</template>

<style scoped>
.mind-map-page {
  display: flex;
  flex-direction: column;
  border: none;
  width: 100%;
  height: 100%;
}


.mind-map-container {
  flex: 1;
  min-height: 700px;
  border: none;
  overflow: hidden;
}
</style>
